/*
 * @Description: 移除当前激活路由标签且跳转至对应目标路由
 * @Author: James324
 * @Date: 2024-01-16 19:20:14
 * @LastEditors: James324
 * @LastEditTime: 2024-01-16 19:27:40
 */

import type { RouteLocationRaw } from 'vue-router';
import router from '@/router/index';

const tagViewStore = tagsViewStore();

/**
 * @param {RouteLocationRaw} to 跳转路径
 */
export default (to: RouteLocationRaw) => {
    tagViewStore.removeActiveTag();
    router.push(to);
};
